<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
%>

<form id="pagerForm" onsubmit="return navTabSearch(this);"
	action="backBorrowOrder/getBorrowPage?bType=${bType}&myId=${params.myId}"
	method="post">
	<div class="pageHeader">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>订单号: <input type="text" name="outTradeNo"
						value="${params.outTradeNo }" />
					</td>
					<td>用户姓名: <input type="text" name="realname"
						value="${params.realname }" />
					</td>
					<td>手机: <input type="text" name="userPhone"
						value="${params.userPhone }" />
					</td>
					<td>公司名称: <input type="text" name="companyName"
						value="${params.companyName }" />
					</td>
					<td>状态： <select name="borrowStatus">
							<option value="">全部</option>
							<c:forEach var="borrowStatus" items="${BORROW_STATUS_ALL}">
								<c:if
									test="${borrowStatus.key eq STATUS_FSTG 
							or borrowStatus.key eq STATUS_HKZ 
							or borrowStatus.key eq STATUS_FKZ
							or borrowStatus.key eq STATUS_FKBH
							or borrowStatus.key eq STATUS_FKSB}">
									<option value="${borrowStatus.key}"
										<c:if test="${borrowStatus.key eq params.borrowStatus}">selected="selected"</c:if>>${borrowStatus.value}</option>
								</c:if>
							</c:forEach>
					</select>
					</td>
					<td>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</div>
	<div class="pageContent">


		<jsp:include page="${BACK_URL}/rightSubList">
			<jsp:param value="${params.myId}" name="parentId" />
		</jsp:include>
		<table class="table" style="width: 100%;" layoutH="112"
			nowrapTD="false">
			<thead>
				<tr>
					<th align="center">序号</th>
					<th align="left">订单号</th>
					<th align="center">姓名</th>
					<th align="center">手机号</th>
					<th align="center">是否是老用户</th>
					<th align="center">借款金额(元)</th>
					<th align="center">天数</th>
					<th align="center">服务费利率(万分之一)</th>
					<th align="center">下单时间</th>

					<th align="center">放款时间</th>

					<th align="center">子类型</th>
					<th align="center">状态</th>
					<th align="center">放款状态</th>
					<th align="center">放款备注</th>
					<!-- 						<th align="center"  > -->
					<!-- 							操作 -->
					<!-- 						</th> -->
				</tr>
			</thead>
			<tbody>
				<c:forEach var="borrow" items="${pm.items }" varStatus="status">
					<tr target="sid_support" rel="${borrow.id }">
						<td>${status.count}</td>
						<td>${borrow.outTradeNo}</td>
						<td>${borrow.user.realname}</td>
						<td>${borrow.user.userPhone }</td>
						<td>${borrow.user.customerTypeName}</td>
						<td><fmt:formatNumber type="number"
								value="${borrow.moneyAmount/100}" pattern="0.00"
								maxFractionDigits="2" /></td>
						<td>${borrow.loanTerm }</td>
						<td>${borrow.apr }</td>
						<td><fmt:formatDate value="${borrow.orderTime }"
								pattern="yyyy-MM-dd HH:mm:ss" /></td>

						<td><fmt:formatDate value="${borrow.loanTime }"
								pattern="yyyy-MM-dd HH:mm:ss" /></td>

						<td>${borrow.orderTypeName }</td>
						<td>${borrow.statusName }</td>
						<td>${borrow.paystatus }</td>
						<td>${borrow.statusName }</td>
						<!-- 									<td> -->
						<%--  	<a href="backBorrowOrder/getBorrowDetailById?selectId=${borrow.id }&parentId=${params.myId}"  target="dialog"  width="810" height="550" >查看</a> --%>
						<!-- 							</td> -->
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<c:set var="page" value="${pm }"></c:set>
		<!-- 分页 -->
		<%@ include file="../page.jsp"%>
	</div>
</form>

<script type="text/javascript">
	if("${message}"){
		alertMsg.error(${message});
	}
</script>